#pragma once

extern struct cpumask *cpu_possible_mask(void);
extern struct cpumask *cpu_present_mask(void);
extern struct cpumask *cpu_online_mask(void);

#define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask())
#define for_each_present_cpu(cpu) for_each_cpu((cpu), cpu_present_mask())
#define for_each_online_cpu(cpu) for_each_cpu((cpu), cpu_online_mask())

bool cpu_online(unsigned int cpu);
bool cpu_active(unsigned int cpu);
void set_cpu_active(unsigned int cpu, bool active);
bool cpu_dying(unsigned int cpu);
